package model

// // Warehouse 仓库 一般正常电商系统会有仓库服务
// type Warehouse struct {
// 	BaseModel
// 	Name    string
// 	Address string
// }

// Inventory 库存
type Inventory struct {
	BaseModel
	Goods   int32 `gorm:"type:int;index;not null;comment:商品ID"`
	Stocks  int32 `gorm:"type:int unsigned;not null;comment:库存量"`
	Version int32 `gorm:"type:int unsigned;not null;comment:乐观锁版本号"` // 分布式锁的乐观锁
}
